# import sys
# sys.path.append("/home/hpdadi/SLS/venv/lib/python3.12/site-packages")

import rclpy
from rclpy.node import Node
from sls_msgs.msg import KeyboardControl as keyboardControlMsg
import keyboard

class KeyboardControl(Node):
    def __init__(self, node_name, *, context = None, cli_args = None, namespace = None, use_global_arguments = True, enable_rosout = True, start_parameter_services = True, parameter_overrides = None, allow_undeclared_parameters = False, automatically_declare_parameters_from_overrides = False, enable_logger_service = False):
        super().__init__(node_name, context=context, cli_args=cli_args, namespace=namespace, use_global_arguments=use_global_arguments, enable_rosout=enable_rosout, start_parameter_services=start_parameter_services, parameter_overrides=parameter_overrides, allow_undeclared_parameters=allow_undeclared_parameters, automatically_declare_parameters_from_overrides=automatically_declare_parameters_from_overrides, enable_logger_service=enable_logger_service)
        
        self.key_twist = keyboardControlMsg()
        self.create_publisher(keyboardControlMsg,'/SLS_Controller/key_control')
        self.create_timer(0.1,self.key_input_callback)


    def key_intput_callback(self):
        pass
        
